package nl.saxion.act.bus;

//import saxion.act.logging.LogOnlyOnceInMultipleTimes;
import nl.saxion.act.bus.Buswereld.TILE_TYPES;
import nl.saxion.act.gameframework.WorldView;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.util.AttributeSet;

public class BuswereldView extends WorldView {
	Buswereld buswereld;

	public BuswereldView( Context context )                                   { super( context                  ); }
    // Tow methods to Constructs AndroidWombatViews based on inflation from XML
    public BuswereldView( Context context, AttributeSet attrs )               { super( context, attrs           ); }
    public BuswereldView( Context context, AttributeSet attrs, int defStyle ) { super( context, attrs, defStyle ); }

	//static LogOnlyOnceInMultipleTimes log1 = new LogOnlyOnceInMultipleTimes( 120 );

	public void drawWorldBackground( Canvas canvas ) {
		buswereld = (Buswereld) world;
		if ( buswereld != null ) {
			Bitmap map = buswereld.getBitmap( TILE_TYPES.PLATTEGROND );
			drawBitmap( map, world.getDimension(), canvas );
		}
	}
}
